package org.finesys.common.log.config;

import org.finesys.common.log.core.aspect.LogHelperAspect;
import org.finesys.common.log.trace.handler.AroundLogHandler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;


/**
 * 日志自动配置
 */
@AutoConfiguration
public class LogHelperAutoConfiguration {
    /**
     * log handler
     *
     * @return log handler bean
     */
    @Bean
    public AroundLogHandler aroundLogHandler() {
        return new AroundLogHandler();
    }

    @Bean
    public LogHelperAspect logHelperAspect(AroundLogHandler aroundLogHandler) {
        return new LogHelperAspect(aroundLogHandler);
    }
}
